package com.company.JUC.ThreadPool;

import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * @ClassName RejectedExecutionHandlerImpl
 * @Description TODO 自定义拒绝策略
 * @Author ylr
 * @Date 2021/7/22 9:45
 * @Version 1.0
 */
public class RejectedExecutionHandlerImpl implements RejectedExecutionHandler {
    @Override
    public void rejectedExecution(Runnable runnable, ThreadPoolExecutor threadPoolExecutor) {
        System.out.println(runnable.toString()+ "  is rejected");
    }
}
